package vip.xiaonuo.megvii.captures.model.base.define;

import java.util.*;

public class AlertorTypeDefine {

    private static Map<String, AlertRule> alertMap = new LinkedHashMap<>();

    static{
        alertMap.put("park",new AlertRule("车辆禁停"));
        alertMap.put("exit",new AlertRule("车辆离开"));
        alertMap.put("wander",new AlertRule("人员徘徊"));
        alertMap.put("overwall",new AlertRule("人员越界-翻墙检测"));
        alertMap.put("fall",new AlertRule("摔倒检测"));
        alertMap.put("smoke",new AlertRule("抽烟检测"));
        alertMap.put("call",new AlertRule("打电话"));
        alertMap.put("watch_phone",new AlertRule("看手机"));
        alertMap.put("run",new AlertRule("人员奔跑"));
        alertMap.put("sleep",new AlertRule("睡岗检测"));
        alertMap.put("no_safetycap",new AlertRule("未佩戴安全帽报警"));
        alertMap.put("no_uniform",new AlertRule("未穿戴安全工服报警"));
        alertMap.put("no_safetybelt",new AlertRule("未佩戴安全带报警"));
        alertMap.put("flame",new AlertRule("火焰报警"));
        alertMap.put("smog",new AlertRule("烟雾报警"));
        alertMap.put("oil_spill",new AlertRule("液体泄露检测"));
        alertMap.put("person_off_duty_querying",new AlertRule("人员值岗/离岗-离岗"));
        alertMap.put("gathering",new AlertRule("人员聚众"));
        alertMap.put("fight",new AlertRule("人员扭打"));
        alertMap.put("intrusion",new AlertRule("入侵"));
        alertMap.put("tripwire",new AlertRule("越界"));
        alertMap.put("no_vest",new AlertRule("未佩戴反光衣报警"));
        alertMap.put("lose_fire_equipment",new AlertRule("消防设施检测(包含灭火器和灭火箱)"));
        alertMap.put("mask_area",new AlertRule("屏蔽区域"));
        alertMap.put("trashbin",new AlertRule("垃圾桶未盖报警"));
        alertMap.put("mice",new AlertRule("老鼠检测"));
        alertMap.put("sundry_detect",new AlertRule("杂物堆放"));
        alertMap.put("situps",new AlertRule("仰卧起坐"));
        alertMap.put("situps_ready_to_start",new AlertRule("仰卧起坐预备动作"));
        alertMap.put("situps_complete_action",new AlertRule("仰卧起坐完整动作"));
        alertMap.put("situps_incomplete_action",new AlertRule("仰卧起坐违规动作"));
        alertMap.put("pullups",new AlertRule("引起向上"));
        alertMap.put("pullups_ready_to_start",new AlertRule("引体向上预备动作"));
        alertMap.put("pullups_complete_action",new AlertRule("引体向上完整动作"));
        alertMap.put("pullups_incomplete_action",new AlertRule("引体向上违规动作"));
        alertMap.put("longjump",new AlertRule("立定跳远"));
        alertMap.put("longjump_ready_to_start",new AlertRule("立定跳远预备动作"));
        alertMap.put("longjump_complete_action",new AlertRule("立定跳远完整动作"));
        alertMap.put("longjump_incomplete_action",new AlertRule("立定跳远违规动作"));
        alertMap.put("head_count",new AlertRule("区域人数统计"));
        alertMap.put("cross_line",new AlertRule("出入口人数统计"));
        alertMap.put("person_over_querying",new AlertRule("超员"));
        alertMap.put("person_less_querying",new AlertRule("少员"));

        alertMap.put("no_respirator",new AlertRule("未佩戴口罩","dw_megvii_capture_data","respirator","2"));
    }


    public static String getAlertorTypeDesc(String key){
        return alertMap.containsKey(key) ? alertMap.get(key).getDesc() : "";
    }

    public static List<Option> getOptions(){
        List<Option> options = new LinkedList<>();
        for (String key : alertMap.keySet()) {
            options.add(new Option(key,alertMap.get(key).getDesc()));
        }
        return options;
    }

}
